package com.founder.gateway.service.impl;

import com.founder.gateway.orm.fzapi.bean.entity.UserEntity;
import com.founder.gateway.service.UserService;
import org.springframework.stereotype.Service;

/******************************************************************************
 * @Package: [com.founder.gateway.service.impl.UserServiceImpl]
 * @ClassName: [UserServiceImpl]
 * @Description: [一句话描述该类的功能]
 * @Author: [fengli@founder.com.cn]  
 * @CreateDate: [2019/1/11 14:03]   
 * @UpdateUser: [fengli@founder.com.cn (如多次修改保留历史记录，增加修改记录)]   
 * @UpdateDate: [2019/1/11 14:03，(如多次修改保留历史记录，增加修改记录)]   
 * @UpdateRemark: [说明本次修改内容, (如多次修改保留历史记录 ， 增加修改记录)]
 * @Version: [v1.0]
 * ${tags}
 */
@Service("userService")
public class UserServiceImpl implements UserService {
    @Override
    public UserEntity queryUser(String id) {
        UserEntity userEntity=new UserEntity();
        userEntity.setId(id);
        userEntity.queryBySelf();
        return null;
    }


    @Override
    public void createUsr(String user, String password) {
        UserEntity userEntity=new UserEntity();
        userEntity.setUser(user);
        userEntity.setPassword(password);
        userEntity.insertSelf();
    }

    @Override
    public void deleteUser(String id) {
        UserEntity userEntity=new UserEntity();
        userEntity.setId(id);
        userEntity.deleteBySelf();
    }

    @Override
    public void updateUser(UserEntity userEntity) {
        userEntity.updateBySelfId();
    }
}
